<?php
/* @var $this LinksController */
/* @var $model Links */

$this->breadcrumbs=array(
	'Management'=>array('/site/management/'),	
	'Maintenance'=>array('/site/maintenance/'),	
	'Links',
);

$this->menu=array(
	array('label'=>'Create New Link', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#links-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Links</h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'links-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		//'idlink',
		array(
			'name'=>'title',
			'header'=>'Title',
			'value'=>'$data->title',
			'htmlOptions' => array(
								'style' => 'text-align: center;width:170px;',
							 ),
		),		
		array(
			'name'=>'url',
			'header'=>'URL',
			'value'=>'$data->url',
			'htmlOptions' => array(
								'style' => 'text-align: center;',
							 ),
		),		
		array(
			'name'=>'enabled',
			'header'=>'Enabled',
			'value'=> 'User::getYesNoValue($data->enabled)',
			'filter' => array('0'=>'No', '1'=>'Yes'),
			'htmlOptions' => array(
								'style' => 'width:20px;text-align:center;',
							 ),
		),		
		//'team_id',
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
